fix(client): Properly set temporal-namespace header on gRPC requests #1712
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was changed
Temporal Cloud requires presence of the
temporal-namespacegRPC metadata on every request to the Workflow Service that contains anamespaceproperty. This was not done on the pure-JS Connection. There it is. Fixes [Feature Request] Puttemporal-namespaceheader on all requests from pure JS client #1697.Note that this logic is taken care by Core SDK on
NativeConnection.Also added CI tests against Temporal Cloud. Credentials are provided through environment variables. Tests will be skipped if credentials are missing.
Breaking notice
IMPORTANT: We previously recommend Temporal Cloud users using API Keys to manually add the
temporal-namespacemetadata to their Client's connection config. This is no longer appropriate and must be removed. Keeping that metadata will result in connection failure, as theGetSystemInforequest must never contain atemporal-namespacemetadata.Given that 1) API Keys were still marked
@experimentalin previous release, and 2) non-Temporal Cloud users may also need to add atemporal-namespaceheader that would have different constraints, we do not make any attempt to "automatically" remove that metadata is explicitly set on requests where it should not be present according to Temporal Cloud's expectations.